<template>
  <div class="layoutHome-wrap">
    <div class="layout-assist-wrap">
      <span
        class="layout-assit-shrink"
        v-if="!inHideAssist"
        @click="toShrinkAssit"
      ></span>
      <span
        class="layout-assit-shrink layout-assit-open"
        v-else
        @click="toShrinkAssit"
      ></span>
      <!--right start-->
      <layout-assist v-if="!inHideAssist"></layout-assist>
      <!--right edn-->
    </div>

    <div class="layout-sidebar-wrap" style>
      <span
        class="layout-sidebar-shrink"
        v-if="!isHideSidebar"
        @click="toShrink"
      ></span>
      <span
        class="layout-sidebar-shrink layout-sidebar-open"
        v-else
        @click="toShrink"
      ></span>
      <!--left start-->
      <layout-sidebar v-if="!isHideSidebar"></layout-sidebar>
      <!--left edn-->
    </div>

    <!-- <div class="layout-main-wrap"> -->
    <!--main start-->
    <!-- <layout-main></layout-main> -->
    <!--main edn-->
    <!-- </div> -->
    <!-- 应急队伍图例 -->
    <Lengend></Lengend>
  </div>
</template>
<script lang="ts">
import { Component, Vue, Prop } from "vue-property-decorator";
import layoutAssist from "@/views/classic/LayoutAssist.vue";
import layoutMain from "@/views/classic/LayoutMain.vue";
import layoutSidebar from "@/views/classic/LayoutSidebar.vue";
import Lengend from "@/components/common/gis/lengend/lengend.vue";
@Component({
  name: "YjdwfbHome",
  components: {
    layoutAssist,
    layoutMain,
    layoutSidebar,
    Lengend
  }
})
export default class YjdwfbHome extends Vue {
  private isHideSidebar = false;
  private inHideAssist = false;
  private toShrink() {
    this.isHideSidebar = !this.isHideSidebar;
  }
  private toShrinkAssit() {
    this.inHideAssist = !this.inHideAssist;
    this.$store.dispatch("layoutModule/isHideAssistEmit", this.inHideAssist);
  }

  private beforeDestroy() {
    console.log("应急队伍分布销毁前——————————————————————————");
    console.log(new Date());
    console.log(this.$store.state["YjdwfbModule" as any].yjdwfbMap);
    this.$store.state["YjdwfbModule" as any].yjdwfbMap.unload();
  }
}
</script>
<style lang="less" scoped>
@import url("../../../assets/css/Layout.less");
</style>
